<?		
	function parse_section($url)
	{
		$section_selector = '.bratd';

		if ($dom = file_get_html($url))
		{
			$result = array();
			foreach ($dom->find($section_selector) as $element) {
				$tmp_section = array();
				$name = $element->find('b');
				$name = $name[0];
				$name = iconv('windows-1251', 'utf-8', $name->innertext);
				$tmp_section['name'] = $name;
				$tmp_section['catalogs'] = parse_section_catalogs($element);
				$result[] = $tmp_section;
			}
			if (count($result) > 0)
			{
				return $result;
			}
		}		
		return false;		
	}

	function parse_section_catalogs($section)
	{		
		$catalogs = $section->find('a');
		$tmp_catalogs = array();
		foreach ($catalogs as $element) {
			$catalog = array();
			$catalog['name'] = $element->innertext;
			$catalog['href'] = $element->href;
			$tmp_catalogs[] = $catalog;
			unset($catalog);
		}
		if (count($tmp_catalogs) > 0)
		{
			return $tmp_catalogs;
		}
		return false;
	}